//
//  BCActivityIndicatorHUD.m
//  GSBlockChain
//
//  Created by guoshikeji_a on 2018/12/7.
//  Copyright © 2018 guoshikeji. All rights reserved.
//

#import "BCActivityIndicatorHUD.h"

@interface BCActivityIndicatorHUD ()


@end

@implementation BCActivityIndicatorHUD

- (instancetype)init
{
    self = [super init];
    if (self) {
        self.activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
    }
    return self;
}
- (void)setActivityIndicatorViewStyle:(UIActivityIndicatorViewStyle)activityIndicatorViewStyle {
    _activityIndicatorViewStyle = activityIndicatorViewStyle;
    //
    if (_activityIndicatorView) {
        [_activityIndicatorView removeFromSuperview];
    }
    _activityIndicatorView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:activityIndicatorViewStyle];
    [self addSubview:_activityIndicatorView];
    [_activityIndicatorView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.centerX.mas_equalTo(self);
    }];
}


@end
